#include "RIVIAFileIO.h"
#include "RIVIAFileImporterMgr.h"
#include "RIVIAFileExporterMgr.h"
#include "Import/RIVIAFileImporterBase.h"
#include "Export/RIVIAFileExporterBase.h"

RIVIAFileIO::RIVIAFileIO()
{

}

RIVIAFileIO::~RIVIAFileIO()
{

}

bool RIVIAFileIO::importFile(const QString &strFileName)
{
    RIVIAFileImporterBase *pImporter = RIVIAFileImporterMgr::getInstance()->getImporter("IMAGE");
    if(nullptr != pImporter)
        return pImporter->importFile(strFileName);
    else
        return false;
}

bool RIVIAFileIO::exportFile(const QString &strFileName)
{
    RIVIAFileExporterBase *pExporter = RIVIAFileExporterMgr::getInstance()->getExporter("IMAGE");
    if(nullptr != pExporter)
        return pExporter->exportFile(strFileName);
    else
        return false;
}
